package com.blackitheima3.InnerDemo;
//匿名内部类
public class TestInner {
    public static void main(String[] args) {
        //创建实现类对象
        InterImple im=new InterImple();
        im.show();
        im.show1();
        im.show2();
        //单实现匿名内部类
        new Inter(){

            @Override
            public void show() {
                System.out.println("@@@@@@");
            }
        }.show();
        //多实现匿名内部类
       Inter1 i= new Inter1(){

            @Override
            public void show() {
                System.out.println("&&&&");
            }

            @Override
            public void show1() {
                System.out.println("$$$$$");
            }

            @Override
            public void show2() {
                System.out.println("#####");
            }
        };
       i.show();
       i.show1();
       i.show2();

    }
}
interface Inter{
    public abstract void show();
}
interface Inter1 extends Inter {
    @Override
    void show();
    public abstract void show1();
    public abstract void show2();
}
class InterImple implements Inter,Inter1{

    @Override
    public void show() {
        System.out.println("======");
    }

    @Override
    public void show1() {
        System.out.println("******");
    }

    @Override
    public void show2() {
        System.out.println("%%%%%%");
    }
}